def make_operators(i, j):

  print "rl %3i %3i ( %20.12f, %20.12f )" %(i, j,  0.50,  0.0)
  print "rl %3i %3i ( %20.12f, %20.12f )" %(j, i,  0.50,  0.0)
  print "nn %3i %3i ( %20.12f, %20.12f )" %(i, j,  1.00,  0.0)
  print "n  %3i     ( %20.12f, %20.12f )" %(i,    -0.50,  0.0)
  print "n  %3i     ( %20.12f, %20.12f )" %(j,    -0.50,  0.0)
  print "i          ( %20.12f, %20.12f )" %(       0.25,  0.0)
  print ""

n = 4
m = 4

for j in range(m):
  for i in range(n):

    # horizontal bond
    make_operators( j*n+i, j*n+(i+1)%n )

    # verticle bond
    make_operators( j*n+i, (j+1)%m*n+i )
